import React, { useState, useEffect } from 'react'
import { Tabs } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
import axios from 'axios'
import Payment from '../../components/Lists/Payment'
import Purchase from '../../components/Lists/Purchase'
import Refund from '../../components/Lists/Refund'
type Props = {}

function Classfiy({ }: Props) {
  const [data, setList] = useState([]);
  const addressLists = () => {
    axios.get('http://localhost:4000/ticket').then((res) => {
      setList(res.data);
    });
  };
  useEffect(() => {
    addressLists();
  }, []);
  return (
    <div className='ordes'>
      <Tabs>
        <Tabs.Tab title='全部' key='1'>
          <Purchase></Purchase>
          <Payment></Payment>
          <Refund></Refund>
        </Tabs.Tab >
        <Tabs.Tab title='待出行' key='2'>
          <Purchase></Purchase>
        </Tabs.Tab>
        <Tabs.Tab title='待支付' key='3'>
          <Payment></Payment>
        </Tabs.Tab>
        <Tabs.Tab title='退款/已取消' key='4'>
          <Refund></Refund>
        </Tabs.Tab>
      </Tabs >
    </div >
  )
}

export default Classfiy

